# 支持的小说站点
def get_sources(search_name):
    return [
        {
            # 站点名
            "name": "笔趣阁",
            # 站点地址
            "web-url": "https://www.bqg9527.com",
            # 站点搜索引擎
            "search-engines": {
                "url": "https://www.bqg9527.com/s.php",
                "method": "POST",
                "headers": {
                    "origin": "https://www.bqg9527.com",
                    "referer": "https://www.bqg9527.com/",
                    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
                    "Accept": "*/*",
                    "Cache-Control": "no-cache",
                    "Host": "www.bqg9527.com",
                    "Content-Type": "application/x-www-form-urlencoded"
                },
                # 请求报文
                "data": {
                    "type": "articlename",
                    'language': 'zh_cn',
                    "s": search_name
                },
                # 数据筛选路径
                "xpath": {
                    # 筛选搜索到的小说列表
                    "novel-list": '//*[@id="history"]/li[position()>1]',
                    # 筛选小说子元素
                    "novel-info": {
                        # 小说名
                        "novel-name": '//span[@class="t2"]/a/text()',
                        # 小说作者
                        "author": '//span[@class="t3"]/text()',
                        # 小说最新章节
                        "new-chapter": '//span[@class="t4"]//text()',
                        # 小说详情页地址
                        "url": '//span[@class="t2"]/a/attribute::href'
                    }
                }
            },
            "details-page": {
                # 详情页下的章节筛选
                "list-xpath": '//*[@id="list"]/dl/dt[2]/following-sibling::dd',
                # 详情页下的网址
                "url": "//a/attribute::href",
                # 详情页的章节名位置
                "chapter-name": '//a/text()',
                # 章节页的筛选
                "content-xpath": '//*[@id="content"]/text()',
                # 请求方式
                "method": "GET",
                # 请求头headers
                "headers": {
                    "user-agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.163 Safari/535.1",
                    "Accept": "*/*",
                    "Cache-Control": "no-cache",
                    "Content-Type": "application/x-www-form-urlencoded"
                }
            }
        }
    ]